package com.fitso.model.calculator.idealweight;

import com.fitso.model.bean.Body;
import com.fitso.model.bean.Body.Sex;
import com.fitso.model.bean.measure.length.Foot;
import com.fitso.model.bean.measure.length.Length;
import com.fitso.model.bean.measure.mass.KiloGram;
import com.fitso.model.bean.measure.mass.Mass;
import com.fitso.model.calculator.IdealWeightCalculator;

/**
 * Implementation of {@link IdealWeightCalculator} that starts at a lower weight
 * but has a steeper slope than either Robinson or Miller. This calculator is
 * best used for median height men - 65-70in. For women this calculation is too
 * low and can be difficult for most women and dangerous for shorter women
 * (height < 60in), but ideal for most men.
 * 
 * @author timothystorm
 * 
 */
public class DevineIdealWeightCalculator extends AbstractIdealWeightCalculator implements IdealWeightCalculator {

	protected Mass getRootWeight(Body body) {
		return new KiloGram(body.getSex() == Sex.MALE ? 50.0 : 45.5);
	}

	protected Mass getWeightMultiplier(Body body) {
		return new KiloGram(2.3);
	}

	protected Length getMedianHeight(Body body) {
		return new Foot(5.0);
	}
}
